- title 'Edit account'

- content_for :head do
  = javascript_include_tag 'validation', 'register_and_account'

- content_for :title do
  = link_to "← Back to account dashboard", account_path(current_account), :class => 'back'
  %h1 Edit account

- if is_account_admin?
  - content_for :side_panel do
    .side-panel
      %h2 Manage users
      Invite and manage users who have access to this account
      .button-container
        = link_to 'Manage and invite users', account_users_path(current_account), :class => 'button'

= form_for(@account) do |f|
  - unless @account.errors.blank?
    .form_errors
      The form was not completed correctly.  Please correct the following fields to register:
      %ul
        - @account.errors.full_messages.each do |error|
          %li
            = error
  != render :partial => 'form', :locals => { :f => f, :account => @account }

  %br/
  %br/
  = f.submit "Update account"
  = link_to 'cancel', account_path(@account)
